package com.user.client;

import com.user.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "service-provider", fallback = UserClientFallback.class)    // 你要调用对微服务名称
public interface UserClient {
    @GetMapping("user/{id}")
    public User queryUserById(@PathVariable("id") Long id);

}

